<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>JSP - Hello World</title>
    <style type="text/css">
        #outer, form{
            margin: 30px auto;
            width: fit-content;
        }
    </style>
</head>
<body>
<div id="outer">
    <h1><%= "Upload/Download Files Demo " %></h1>
    <br/>
    <div id="form">
<%--        <form action="upload" enctype="multipart/form-data">--%>
        <form action="upload" method="post" enctype="multipart/form-data">
            <input type="file" name="pic">
            <br>
            <input type="text" name="uname" placeholder="输入用户名">
            <br>
            <input type="submit" value="upload">
        </form>
    </div>
</div>
</body>
</html>

<%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%>
<%--<html>--%>
<%--<head>--%>
<%--    <title>$Title$</title>--%>
<%--</head>--%>
<%--<body>--%>
<%--<h1>index.jsp</h1>--%>
<%--<form action="upload" method="post" enctype="multipart/form-data">--%>
<%--    姓名:<input type="text" name="uname"><br>--%>
<%--    图片:<input type="file" name="pic"><br>--%>
<%--    <input type="submit" value="上传">--%>
<%--</form>--%>
<%--</body>--%>
<%--</html>--%>
